


(function($){
	
	$("#continueBtn").on("click",function(){
		waitingRequest();
	});
	$("#calBtn").on("click",function(){
		cancelRequest();
		
	});
				
})(jQuery);
function waitingRequest(){
	alert("continue");
	var cus_id=window.customer.id;	
	var invocationData = {
			adapter :   'stAdp',
			procedure : 'waitingRequest',
			parameters : [{'cus_id': cus_id}]
		};
	
	WL.Client.invokeProcedure(invocationData,{
		onSuccess : waitingRequestSuccess,
		onFailure : waitingRequestFailure,
	});
}
function waitingRequestSuccess(result){
	
	if(result.invocationResult.resultCode==0){
		alert("operation success!");
		$.mobile.changePage("../view/customer-main.html");
	}else if(result.invocationResult.resultCode==1){
		alert("system error!");	
	}else{
		WL.Logger.error("waiting request failure");
	}
			
}

function waitingRequestFailure(result){
	
		WL.Logger.error("waiting request failure");	
}
